home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3848 < prev    next >
Encoding:
Text File  |  1996-08-05  |  695 b   |  31 lines

  1. Path: newsbf02.news.aol.com!not-for-mail
  2. From: polver@aol.com (Polver)
  3. Newsgroups: comp.lang.c
  4. Subject: EOF error
  5. Date: 31 Jan 1996 10:15:23 -0500
  6. Organization: America Online, Inc. (1-800-827-6364)
  7. Sender: root@newsbf02.news.aol.com
  8. Message-ID: <4eo12b$om3@newsbf02.news.aol.com>
  9. Reply-To: polver@aol.com (Polver)
  10. NNTP-Posting-Host: newsbf02.mail.aol.com
  11.  
  12. Why doesn't the following work.
  13. I'm using a unix system at school.
  14.  
  15. #include <stdio.h>
  16.  
  17. main()
  18. {
  19.     int c;
  20.  
  21.     c = getchar();
  22.     while (c != EOF) {
  23.         putchar(c);
  24.         c = getchar(c);
  25.     }
  26. }
  27.  
  28. I keep getting an error about EOF undefined ar not scalar or something.
  29. You can reply here or at pmarti01@hills.ccsf.cc.ca.us
  30. Thanks.
  31.